package com.pc.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

@Service
public class HomeService {
	@Autowired private HomeDao dao;
	
	//Home.jsp에 출력해 주는 카테고리 검색
	public void categoryList(Model model) {
		List<HomeBeans> mainLeftList = dao.mainLeftSelect();
		List<HomeBeans> mainRightList = dao.mainRightSelect();
		List<HomeBeans> subList = dao.subSelect();
		List<HomeBeans> etcList = dao.etcSelect();

		model.addAttribute("mainLeftList", mainLeftList);
		model.addAttribute("mainRightList", mainRightList);
		model.addAttribute("subList", subList);
		model.addAttribute("etcList", etcList);
	}
}
